import { msg } from '../../components/notice/notice';

Template.channelDelete.events({
  'click #delete-channel-button'(event, instance) {
    let id = instance.data.channel._id;
    $('#channel-delete').modal('hide');
    Router.go('/channels');
    setTimeout(() => {
      Meteor.call('deleteChannel', id, function() {
        msg({content: '频道删除成功'});
      });
    }, 1000);
  }
});